package com.bridge.client.bridgedynamcclient.controller;

import com.bridge.client.bridgedynamcclient.utils.FXMLUtil;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;

import java.net.URL;
import java.util.ResourceBundle;

public class BridgeAddSuccessController extends BaseController implements Initializable {

    @FXML
    private Button btnAddNext;
    @FXML
    private Button btnHome;
    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        initListener();
    }

    private void initListener() {
        btnAddNext.setOnAction(a->{
            //跳转页面
            FXMLLoader loader = FXMLUtil.getLoader(getClass(), "bridge-record-list-view.fxml");
            FXMLUtil.loadView(loader);

            //关闭当前页面
            FXMLUtil.closeState(btnHome.getScene());
        });
        btnHome.setOnAction(a->{
            FXMLUtil.closeState(btnHome.getScene());
        });
    }
}
